package self.hoy.demo.grainmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import self.hoy.demo.common.utils.PageUtils;
import self.hoy.demo.grainmall.product.entity.AttrGroup;
import self.hoy.demo.grainmall.product.vo.AttrGroupWithAttrsVo;
import self.hoy.demo.grainmall.product.vo.SpuItemAttrGroupVo;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author Hoy
 * @email xxx@gmail.com
 * @date 2020-07-04 19:01:00
 */
public interface AttrGroupService extends IService<AttrGroup> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * @author Hoy
     * @date 2020-07-17
     * @param params
     * @param catelogId
     * @return
     */
    PageUtils queryPage(Map<String, Object> params, Long catelogId);

    List<AttrGroupWithAttrsVo> getAttrGroupWithAttrsByCatelogId(Long catelogId);

    /**
     * 查出当前spu对应的所有属性的分组信息
     * @param spuId
     * @param catalogId
     * @return
     */
    List<SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(Long spuId, Long catalogId);
}

